package com.pj.wisdomlogistics.mvp.presenter;


import com.pj.wisdomlogistics.entity.TransactHistoryInfo;
import com.pj.wisdomlogistics.mvp.contract.TransactHistoryContract;
import com.pj.wisdomlogistics.mvp.frame.ActivityPresenter;
import com.pj.wisdomlogistics.mvp.model.TransactHistoryModel;
import com.pj.wisdomlogistics.rx.FilterSubscriber;


public class TransactHistoryPresenter extends ActivityPresenter<TransactHistoryModel, TransactHistoryContract.View> implements TransactHistoryContract.Presenter {
    public static final String TAG = "TransactHistoryPresenter";

    @Override
    public void alreadydo(String userID, String timeString) {
        addSubscription(getModel().alreadydo(userID, timeString), new FilterSubscriber<TransactHistoryInfo>() {
            @Override
            public void onNext(TransactHistoryInfo mInfo) {
                getView().onSuccess(mInfo);
            }

            @Override
            public void onError(int errorCode, String errorMsg) {
                getView().onError(errorMsg);
            }

        });
    }
}
